function run() {
    console.log(typeof x);
    console.log(y);
    console.log(a);
    console.log(foo());
    var a = 1
    function foo() {
        return 2
    }
}
run()
// undefined Uncaught ReferenceError: y is not defined
